package com.youlai.boot.system.converter;

import org.mapstruct.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.boot.system.model.entity.Productsingle;
import com.youlai.boot.system.model.form.ProductsingleForm;
import com.youlai.boot.system.model.dto.ProductsingleExcelDTO;

import java.util.List;

/**
 * 单品跟进对象转换器
 *
 * @author xiheforever
 * @since 2025-05-16 23:05
 */
@Mapper(componentModel = "spring")
public interface ProductsingleConverter{

    ProductsingleForm toForm(Productsingle entity);

    Productsingle toEntity(ProductsingleForm formData);

    /**
     * 实体转Excel DTO
     */
    ProductsingleExcelDTO entity2ExcelDTO(Productsingle entity);

    /**
     * 实体列表转Excel DTO列表
     */
    List<ProductsingleExcelDTO> entity2ExcelDTO(List<Productsingle> entityList);

    /**
     * Excel DTO转实体
     */
    Productsingle excelDTO2Entity(ProductsingleExcelDTO excelDTO);
}